import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

///初始化
void screenInit(context) {
  ScreenUtil.init(context, designSize: Size(375, 760), allowFontScaling: true);
}

/// 设置宽度
double setWidth(double width) {
  return ScreenUtil().setWidth(width);
}

/// 设置宽度
double setHeight(double height) {
  return ScreenUtil().setHeight(height);
}

/// 设置字体大小
double setFontSize(double fontSize) {
  return ScreenUtil().setSp(fontSize);
}

/// 获取计算后的屏幕高度
double screenHeight() {
  return ScreenUtil().screenHeight;
}

/// 获取计算后的屏幕
double screenWidth() {
  return ScreenUtil().screenWidth;
}
